package operator_0817;

public class ConditionOperator {
    public static void main(String[] args) {
//        int a=10;
//        int b=5;
//        int max=a>b?a:b;
//        System.out.println(max);
//        int a=10;
//        int b=5;
//        System.out.println(a>b?1:1.5);//隐式转换
          int a=10;
          int b=20;
          int avg=a+(b-a)>>1;//+比>>优先级大
          int avg1=a+((b-a)>>1);
        System.out.println(avg);//10
        System.out.println(avg1);//30
    }
}
